<template>
    <view class="noticePart">
        <view class="middle" v-if="!isHide">

            <view class="notice-center" @click="goGuide">
                <view class="imgBox">
                    <image src="../../static/images/xiaoxie.png" mode="widthFix" lazy-load="false" />
                </view>

                <view class="desc">
                    <text class="big">选蟹指南</text>
                    <text class="mr5">怎么才算是精品的大闸蟹</text>
                    <uni-icons type="right" color="#eaeaea" size="18"></uni-icons>
                </view>
            </view>

        </view>
        <view class="right" v-else @click="goGuide">
            <view class="imgBox">
                <image src="../../static/images/xiaoxie.png" mode="widthFix" lazy-load="false" />
            </view>
            <view class="desc">
                <view class="big">选蟹</view>
                <view class="big">指南</view>
            </view>
        </view>
    </view>
</template>
<script>
export default {

    data () {
        return {
            open: false,
            isHide:true,
        }
    },
    components: {},
    onShow () {


    },
    mounted (option) {

        // this.handleOpen()

        //是否已经显示过了
        let isHasSHowedGuide = uni.getStorageSync('isHasSHowedGuide')


        console.log('askjajshasxhx',uni.getStorageSync('isHasSHowedGuide'))


            this.isHide = isHasSHowedGuide == 200
     

        

    },
    methods: {

        handleOpen () {
            // const audio = wx.createInnerAudioContext()
            // audio.src = 'https://gxm-ecommerce.oss-cn-shenzhen.aliyuncs.com/user_upload/rc-upload-1547213682422-20.mp3'
            // audio.play()
            this.open = false

        },
        goGuide(  ){

            this.isHide = true
            
            this.$goNext('/pages/chooseguide/index')
        },

        emptyEvent () {
            return false;
        },
        videoErrorCallback: function (e) {
            
            uni.showModal({
                content: e.target.errMsg,
                showCancel: false
            })
        },
    }
}
</script>
<style scoped lang="scss">
.noticePart {
    position: fixed;
    bottom: 100rpx;
    width: 100%;
    height: 1rpx;
    text-align: center;
    .middle {
        display: inline-block;
        text-align: left;
    }
    .notice-center {
        // position: absolute;
        background: rgba(59 ,62, 69,.8);
        border-radius: 6rpx;
        padding: 10rpx 20rpx;
        display: flex;
        .imgBox {
            position: relative;
            height: 66rpx;
            width: 80rpx;
            image {
                position: absolute;
                width: 160rpx;
                left: -46rpx;
                bottom: 0;
            }
        }

        .desc {
            color: rgba(255, 255, 255, 0.85);
            flex: 1;
            display: flex;
            align-items: center;
            margin-left: 10rpx;
            font-size: 26rpx;
            .big {
                color: rgba(255, 255, 255, 0.95);
                font-size: 36rpx;
                margin: 0 18rpx;
            }
        }
    }
    .right{
        position: absolute;
        right: 2rpx;
        bottom: 0rpx;
        height: 46rpx;
        .imgBox {
            // height: 80rpx;
            width: 80rpx;
            image {
                width: 100%;
                height: 100%;
            }
        }

        .desc {
            text-align: center;
            color: rgba(0, 0, 0, 0.85);
            font-size: 20rpx;
            line-height: 1.2;
        }
    }
}
</style>